home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-25 | 56.6 KB | 2,025 lines |
- Newsgroups: comp.sources.misc
- From: Martin Fouts <fouts@clipper.ingr.com>
- Subject: v21i036: cloops - Livermore Loops in C, Part01/03
- Message-ID: <csm-v21i036=cloops.210138@sparky.imd.sterling.com>
- X-Md4-Signature: 503da5fea5124ad1b2add80b4beaef7f
- Date: Thu, 25 Jul 1991 02:06:41 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Martin Fouts <fouts@clipper.ingr.com>
- Posting-number: Volume 21, Issue 36
- Archive-name: cloops/part01
- Environment: Cray2, Alliant Convex Amdahl, Sun, SGI
-
- The Livermore Loops are a well known benchmark of Fortran performance,
- originally intended for supercomputer evaluation, but often run on
- other machines. This version was hand translated from Fortran into C
- as part of a research project to compare the two languages for the
- purpose of numerical computation. In response to a recent request in
- comp.benchmarks, this version is being posted in comp.source.misc.
-
- #----- cut here for Part01
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 3)."
- # Contents: Makefile README data.h externs.h main.c params.h
- # patchlevel.h report.c secs.c signal.c sizes.c sordid.c stats.c
- # statw.c sumo.c test.c tick.c types.h valid.c values.c vector.c
- # Wrapped by fouts@bozeman on Sun Jul 21 18:23:19 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile'\"
- else
- echo shar: Extracting \"'Makefile'\" \(1870 characters\)
- sed "s/^X//" >'Makefile' <<'END_OF_FILE'
- X#
- X# Makefile For C Livermore Loops
- X# Copyright (C) 1991 Martin Fouts
- X#
- X# This program is free software; you can redistribute it and/or modify
- X# it under the terms of the GNU General Public License as published by
- X# the Free Software Foundation; either version 1, or (at your option)
- X# any later version.
- X#
- X# This program is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY; without even the implied warranty of
- X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X# GNU General Public License for more details.
- X#
- X# You should have received a copy of the GNU General Public License
- X# along with this program; if not, write to the Free Software
- X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X#
- XCC= acc
- X
- XDEFS= -DCOMPUTER='"IP6000"' \
- X -DCOMPILER='"acc -knr"'
- X
- XCFLAGS= -knr $(DEFS) -DBUZZ
- X
- XTARFILE= lloops.tar
- XINCS= data.h externs.h types.h params.h
- X
- XSRCS= baseline.c kernel.c main.c report.c secs.c \
- X signal.c sizes.c sordid.c stats.c statw.c \
- X sumo.c test.c tick.c valid.c values.c vector.c
- X
- XOBJS= kernel.o report.o secs.o \
- X signal.o sizes.o sordid.o stats.o statw.o \
- X sumo.o test.o tick.o valid.o values.o vector.o
- X
- XPROGS= lloops baseline
- X
- XLIBS= -lm
- X
- Xall: lloops
- X
- Xbaseline: baseline.o
- X $(CC) -o baseline baseline.o
- X
- Xlloops: main.o $(OBJS)
- X $(CC) $(CFLAGS) -o lloops main.o $(OBJS) $(LIBS)
- X
- Xmain.o: data.h
- X
- Xkernel.o: externs.h
- Xmain.o: types.h data.h
- Xreport.o: externs.h types.h
- Xsecs.o: types.h
- Xsignal.o: externs.h types.h
- Xsizes.o: externs.h types.h
- Xsordid.o: types.h
- Xstats.o: types.h
- Xstatw.o: types.h
- Xsumo.o: types.h
- Xtest.o: externs.h types.h
- Xtick.o: externs.h types.h
- Xvalid.o: types.h
- Xvalues.o: externs.h types.h
- Xvector.o: externs.h types.h
- X
- Xclean:
- X rm -f main.o $(OBJS) $(PROGS)
- X
- Xlint:
- X lint -lc $(DEFS) $(SRCS) > lint.log
- X
- Xdist:
- X tar cf $(TARFILE) Makefile README $(SRCS) $(INCS)
- END_OF_FILE
- if test 1870 -ne `wc -c <'Makefile'`; then
- echo shar: \"'Makefile'\" unpacked with wrong size!
- fi
- # end of 'Makefile'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2953 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XThis directory contains the C source code for a translation of the 24
- Xloop version of the Livermore Fortran Kernels, as described in "The
- XLivermore Fortran Kernels: A Computer Test of the Numerical
- XPerformance Range" by Frank H. McMahon at Lawerence Livermore National
- XLaboratory. (LLNL UCRL-53745) This version was done independently by
- XMartin Fouts while employeed by NASA at the Ames Research Center.
- XThis version is copyright by the author. See file COPYING for copying
- Xconditions.
- X
- XThis is version 0.3. Please report any bugs to fouts@clipper.ingr.com
- X
- XTo build the Loops, edit the Makefile and change the DEFS and CFLAGS
- Xlines as appropriate. Be sure to change the COMPUTER and COMPILER
- Xdefines to match the computer and compiler the program is being run
- Xon. Leave the 'BUZZ' def defined.
- X
- XThe only other defines which might be of interest have to do with the
- Xtiming routines contained in secs.c. As configured, secs.c will
- Xperform correct timing functions for generic System V systems.
- XDefining BSD_TIME will use BSD timing functions rather than System V
- Xfunctions. CONVEX_TIME or CRAY_TIME may be defined to take advantage
- Xof higher resolution clocks on those systems.
- X
- XThe only function from secs.c which is used by the loops is second,
- Xwhich mimics the second() subroutine available in some Fortran
- Ximplementations. Second "returns the elapsed cpu time since the start
- Xof the job." as a floating point number measured in seconds. It is
- Xpermissable to use a local implementation of this function when making
- Xthe measurements.
- X
- XAfter editing the makefile, Check the typedefs in "types.h" It may be
- Xnecessary to modify the "Float" typedef from float to double, long
- Xdouble, or whatever is locally appropriate. If you change Float in
- Xtypes.h, you must manually change secs.c
- X
- XAfter building lloops with make, it can be run by just typing
- X
- Xlloops
- X
- Xwhich will run the same test case as the Fortran codes reported in the
- XLoops Report.
- X
- XThe usage of lloops is
- X
- Xlloops [-p N] [-t X]
- X
- Xwhere 'N' is an integer > 1 which specifies the number of passes to
- Xrun each test. If the pass count is not specified it is set to 100,
- Xwhich is the default.
- X
- X'X' is a bit flag which is used to determine which loops to run. It
- Xis mostly of interest when debugging the kernels. X is read as a hex
- Xnumber. Test numbers correspond to bit positions from the low order
- Xpower of two outward. If X is not specified, it defaults to running
- Xall of the kernels.
- X
- XFor a detailed discussion of the lloops, see the report mentioned
- Xabove. For some comparisons of C and Fortran lloops, see "The
- XLivermore Loops in C" (Soon to be published) by Fouts. If you get
- Xnumbers from a given machine, please mail a copy of the complete
- Xoutput to fouts@clipper.ingr.com
- X
- XPlease note that these loops were done independently of the Fortran
- XLoops and are a product of the Numerical Aerodynamic Simulation
- XFacility at the NASA Ames Research Center in Moffet Field California.
- X
- X
- END_OF_FILE
- if test 2953 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'data.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'data.h'\"
- else
- echo shar: Extracting \"'data.h'\" \(3103 characters\)
- sed "s/^X//" >'data.h' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "params.h"
- XFloat Time[NTESTS];
- X
- XInt in_lp;
- X
- XFloat loops[NTESTS];
- X
- XFloat nrops[NTESTS] = {
- X 5.,4.,2.,2.,2.,2.,16.,36.,17.,9.,1.,1.,
- X 7.,11.,33.,7.,9.,44.,6.,26.,2.,17.,11.,1.,
- X};
- X
- XFloat wt[] = {
- X 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- X 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- X 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- X};
- X
- XFloat csum[NTESTS];
- X
- XFloat skale[47] = {
- X 0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,
- X 0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,
- X 0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1,
- X};
- X
- XFloat bias[47] = {
- X 0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,
- X 0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,
- X 0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0 ,0.0,
- X};
- X
- XInt ispan[NTESTS] = {
- X l1, l2, l1, l1, l1, l13, m7, m2,
- X l2, l2, l1, m1, l13, l1, l2, l16,
- X l2, m2, l2, m1, l21, l2, m2, l1, 0,
- X};
- X
- XInt isp2[NTESTS] = {
- X 101, 101, 101, 101, 101, 32, 101, 100,
- X 101, 101, 101, 100, 32, 101, 101, 40,
- X 101, 100, 101, 100, 20, 101, 100, 101, 0,
- X};
- X
- XInt isp3[NTESTS] = {
- X 27, 15, 27, 27, 27, 8, 21, 14,
- X 15, 15, 27, 26, 8, 27, 15, 15,
- X 15, 14, 15, 26, 15, 15, 14, 27, 0,
- X};
- X
- XInt ipass[NTESTS] = {
- X 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 0,
- X};
- X
- XInt ion, j5, k2, k3, lp, m, kr, n13h, n, n1, n13, n213, n813;
- XInt n16, n416, n21, nt1, nt2, n2;
- XFloat a11,a12,a13,a21,a22,a23,a31,a32,a33,ar,br,c0,cr,di,dk;
- XFloat dm22,dm23,dm24,dm25,dm26,dm27,dm28,dn,e3,e6,expmax,flx;
- XFloat q,qa,r,ri,s,scale,sig,stb5,t,xnc,xnei,xnm;
- X
- XInt e[96], f[96], ix[1001], ir[1001], zone[300];
- XFloat u[1001], v[1001], w[1001];
- XFloat x[1001], y[1001], z[1001], g[1001];
- XFloat du1[101], du2[101], du3[101], grd[1001], dex[1001];
- XFloat xi[1001], ex[1001], ex1[1001], dex1[1001];
- XFloat vx[1001], xx[1001], rx[1001], rh[1001];
- XFloat vsp[101], vstp[101], vxne[101], vxnd[101];
- XFloat ve3[101], vlr[101], vlin[101], b5[101];
- XFloat plan[300], d[300], sa[101], sb[101];
- XFloat p[4][512], px[25][101], cx[25][101];
- XFloat vy[101][25], vh[101][7], vf[101][7], vg[101][7], vs[101][7];
- XFloat za[101][7] , zp[101][7], zq[101][7], zr[101][7], zm[101][7];
- XFloat zb[101][7] , zu[101][7], zv[101][7], zz[101][7];
- XFloat b[64][64], c[64][64], h[64][64];
- XFloat u1[5][101][2], u2[5][101][2], u3[5][101][2];
- END_OF_FILE
- if test 3103 -ne `wc -c <'data.h'`; then
- echo shar: \"'data.h'\" unpacked with wrong size!
- fi
- # end of 'data.h'
- fi
- if test -f 'externs.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'externs.h'\"
- else
- echo shar: Extracting \"'externs.h'\" \(2092 characters\)
- sed "s/^X//" >'externs.h' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#define NTESTS 47
- X
- Xextern Int in_lp;
- Xextern Int ion, j5, k2, k3, lp, m, kr, n13h, n, n1, n2, n13, n213, n813;
- Xextern Int n16, n416, n21, nt1, nt2;
- Xextern Float a11,a12,a13,a21,a22,a23,a31,a32,a33,ar,br,c0,cr,di,dk;
- Xextern Float dm22,dm23,dm24,dm25,dm26,dm27,dm28,dn,e3,e6,expmax,flx;
- Xextern Float q,qa,r,ri,s,scale,sig,stb5,t,xnc,xnei,xnm;
- X
- Xextern Float Time[], csum[], loops[], nrops[], wt[], skale[],
- X bias[];
- X
- Xextern Int ispan[], isp2[], isp3[], ipass[];
- X
- Xextern Int e[], f[], ix[], ir[], zone[];
- X
- Xextern Float u[1001], v[1001], w[1001];
- Xextern Float x[1001], y[1001], z[1001], g[1001];
- Xextern Float du1[101], du2[101], du3[101], grd[1001], dex[1001];
- Xextern Float xi[1001], ex[1001], ex1[1001], dex1[1001];
- Xextern Float vx[1001], xx[1001], rx[1001], rh[1001];
- Xextern Float vsp[101], vstp[101], vxne[101], vxnd[101];
- Xextern Float ve3[101], vlr[101], vlin[101], b5[101];
- Xextern Float plan[300], d[300], sa[101], sb[101];
- Xextern Float p[4][512], px[25][101], cx[25][101];
- Xextern Float vy[101][25], vh[101][7], vf[101][7], vg[101][7], vs[101][7];
- Xextern Float za[101][7] , zp[101][7], zq[101][7], zr[101][7], zm[101][7];
- Xextern Float zb[101][7] , zu[101][7], zv[101][7], zz[101][7];
- Xextern Float b[64][64], c[64][64], h[64][64];
- Xextern Float u1[5][101][2], u2[5][101][2], u3[5][101][2];
- END_OF_FILE
- if test 2092 -ne `wc -c <'externs.h'`; then
- echo shar: \"'externs.h'\" unpacked with wrong size!
- fi
- # end of 'externs.h'
- fi
- if test -f 'main.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'main.c'\"
- else
- echo shar: Extracting \"'main.c'\" \(2622 characters\)
- sed "s/^X//" >'main.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X/*
- X * LLNL Fortran kernels, transliterated into C
- X */
- X
- X#define PASSES 100
- X
- X#include <stdio.h>
- X#include "types.h"
- X#include "data.h"
- X#include "patchlevel.h"
- X
- Xlong int DoTest = 0xFFFFFF; /* Default: Run tests 1-24 */
- X#ifdef COMPUTER
- XCharp komput = COMPUTER;
- X#else
- XCharp komput = "Generic";
- X#endif
- X#ifdef COMPILER
- XCharp kompil = COMPILER;
- X#else
- XCharp kompil = "Generic";
- X#endif
- X
- XVoid kernel();
- XVoid report();
- X
- Xmain(argc,argv)
- Xint argc;
- XCharp argv[];
- X{
- X Int iout = 6;
- X Int lset;
- X int i;
- X int cerr = 0;
- X int pflag = 0;
- X int tflag = 0;
- X long int tests = 0;
- X Float tock, tick();
- X
- X in_lp = PASSES;
- X
- X fprintf(stderr, "lloops: version 0.%d\n", PATCHLEVEL);
- X
- X for (i = 1; i < argc; i++) {
- X if (argv[i][0] != '-') {
- X fprintf(stderr,"Extra argument (%s) ignored.\n", argv[i]);
- X cerr++;
- X continue;
- X }
- X switch (argv[i][1]) {
- X case 'p':
- X if (pflag) {
- X fprintf(stderr,"Multiple -p ignored.\n");
- X cerr++;
- X } else {
- X pflag++;
- X if (i == argc - 1) {
- X fprintf(stderr,"-p takes argument\n");
- X cerr++;
- X } else {
- X in_lp = atoi(argv[++i]);
- X if (in_lp < 1) {
- X fprintf(stderr,"Nonpositive pass count!\n");
- X cerr++;
- X }
- X }
- X }
- X break;
- X case 't':
- X if (tflag) {
- X fprintf(stderr,"Multiple -t ignored.\n");
- X cerr++;
- X } else {
- X tflag++;
- X if (i == argc - 1) {
- X fprintf(stderr,"-t takes argument\n");
- X cerr++;
- X } else {
- X sscanf(argv[++i],"%x",&tests);
- X DoTest = tests;
- X }
- X }
- X break;
- X default:
- X fprintf(stderr,"Illegal option (%s) ignored.\n", argv[i]);
- X cerr++;
- X break;
- X }
- X }
- X
- X if (cerr) {
- X fprintf(stderr,"Usage: %s [-p passes] [-t tests]\n", argv[0]);
- X exit(1);
- X }
- X
- X for (lset = 0; lset < 3; lset++) {
- X tock = tick(iout, lset);
- X kernel();
- X report(iout, (Int)24, tock, komput, kompil);
- X }
- X
- X exit(0);
- X}
- END_OF_FILE
- if test 2622 -ne `wc -c <'main.c'`; then
- echo shar: \"'main.c'\" unpacked with wrong size!
- fi
- # end of 'main.c'
- fi
- if test -f 'params.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'params.h'\"
- else
- echo shar: Extracting \"'params.h'\" \(1045 characters\)
- sed "s/^X//" >'params.h' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#define l1 1001
- X#define l2 101
- X#define l13 64
- X#define l13h (l13/2)
- X#define l213 (l13+l13h)
- X#define l813 (8*l13)
- X#define l14 512
- X#define l16 75
- X#define l416 4*75
- X#define l21 25
- X#define m1 1000
- X#define m2 100
- X#define m7 (1001-6)
- X#define NTESTS 47
- X
- END_OF_FILE
- if test 1045 -ne `wc -c <'params.h'`; then
- echo shar: \"'params.h'\" unpacked with wrong size!
- fi
- # end of 'params.h'
- fi
- if test -f 'patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patchlevel.h'\"
- else
- echo shar: Extracting \"'patchlevel.h'\" \(820 characters\)
- sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#define PATCHLEVEL 3
- END_OF_FILE
- if test 820 -ne `wc -c <'patchlevel.h'`; then
- echo shar: \"'patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'patchlevel.h'
- fi
- if test -f 'report.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'report.c'\"
- else
- echo shar: Extracting \"'report.c'\" \(3207 characters\)
- sed "s/^X//" >'report.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include <stdio.h>
- X#include "types.h"
- X#include "externs.h"
- X
- XVoid valid();
- XVoid statw();
- X
- XVoid report(logio, nk, tock, komput, kompil)
- XInt logio, nk;
- XFloat tock;
- Xchar *komput, *kompil;
- X{
- X Float rt[NTESTS], tempo[NTESTS], stat1[12];
- X Float vl1[NTESTS], vl[NTESTS], tv[NTESTS], tv1[NTESTS];
- X Float rt1[NTESTS], wt1[NTESTS], csum1[NTESTS];
- X
- X Float mops[NTESTS], mops1[NTESTS];
- X Int map[NTESTS], in[NTESTS], ispan1[NTESTS];
- X
- X Float scaled;
- X Int k, neff, lv;
- X
- X if (logio < 0) return;
- X scaled= 1000000.0;
- X
- X for (k = 0; k < nk; k++) {
- X rt[k]= (Time[k] - tock)*scaled;
- X mops[k]= nrops[k]*loops[k];
- X tempo[k]= 0.0;
- X vl[k]= ispan[k];
- X if( rt[k] != 0.0) tempo[k]= mops[k]/rt[k];
- X }
- X valid( tv,map,&neff, 1.0e-8,tempo, 1.0e+4,nk);
- X for (k = 0; k < neff; k++) {
- X mops1[k]= mops[ map[k]];
- X rt1[k]= rt[ map[k]];
- X vl1[k]= vl[ map[k]];
- X ispan1[k]= ispan[ map[k]];
- X wt1[k]= wt[ map[k]];
- X tv1[k]= tempo[ map[k]];
- X csum1[k]= csum[ map[k]];
- X }
- X statw( stat1,tv,in, vl1,wt1,neff);
- X lv= stat1[0];
- X statw( stat1,tv,in, tv1,wt1,neff);
- X fprintf(stdout,"********************************************\n");
- X fprintf(stdout,"The Livermore Fortran Kernels (In C!)\n");
- X fprintf(stdout,"********************************************\n");
- X fprintf(stdout,"Computer : %s\n", komput);
- X fprintf(stdout,"Compiler : %s\n", kompil);
- X fprintf(stdout,"Mean Vector L = %d\n", lv);
- X fprintf(stdout,"********************************************\n");
- X fprintf(stdout,
- X "KERNEL FLOPS MICROSEC MFLOP/SEC SPAN WEIGHT SUM\n");
- X fprintf(stdout,
- X "------ ----- -------- --------- ---- ------ ---\n");
- X for (k = 0; k < neff; k++)
- X fprintf(stdout,"%6d%11.4e%11.4e%12.4e%6d%11.4e%20.12e\n", map[k]+1,
- X mops1[k], rt1[k], tv1[k], ispan1[k], wt1[k], csum1[k]);
- X fprintf(stdout,
- X "------ ----- -------- --------- ---- ------ ---\n");
- X fprintf(stdout," MFLOPS RANGE = %.4f TO %.4f Mega-Flops/Sec.\n",
- X stat1[2], stat1[3]);
- X fprintf(stdout," HARMONIC MEAN = %.4f Mega-Flops/Sec.\n", stat1[4]);
- X fprintf(stdout," MEDIAN RATE = %.4f Mega-Flops/Sec.\n", stat1[6]);
- X fprintf(stdout," MEDIAN DEV. = %.4f Mega-Flops/Sec.\n", stat1[8]);
- X fprintf(stdout," AVERAGE RATE = %.4f Mega-Flops/Sec.\n", stat1[0]);
- X fprintf(stdout," STANDARD DEV. = %.4f Mega-Flops/Sec.\n", stat1[1]);
- X}
- END_OF_FILE
- if test 3207 -ne `wc -c <'report.c'`; then
- echo shar: \"'report.c'\" unpacked with wrong size!
- fi
- # end of 'report.c'
- fi
- if test -f 'secs.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'secs.c'\"
- else
- echo shar: Extracting \"'secs.c'\" \(4105 characters\)
- sed "s/^X//" >'secs.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include <stdio.h>
- X#define Float double
- X
- X#ifdef BSD_TIME
- X#include <sys/types.h>
- X#include <sys/times.h>
- X#include <sys/time.h>
- X#define HZ 60
- X#else
- X#ifdef CONVEX_TIME
- X#include <sys/types.h>
- X#include <sys/times.h>
- X#include <sys/time.h>
- X#include <sys/resource.h>
- X#define HZ 60
- X#else
- X#include <sys/types.h> /* To avoid errors in param.h */
- X#include <sys/param.h> /* To obtain the local value for HZ */
- X#include <sys/times.h>
- X#endif
- X#endif
- X
- X#ifdef ETA_BUG
- Xfloat Hz;
- Xstatic int hz = 100;
- X#endif
- X
- X#define MICRO 1000000.0 /* number of microseconds in a second */
- X
- XFloat second(oldsec)
- XFloat oldsec;
- X{
- X float mytime, cptime();
- X mytime = cptime();
- X return((Float)mytime-oldsec);
- X}
- X
- XFloat second_(oldsec)
- XFloat *oldsec;
- X{
- X return second(*oldsec);
- X}
- X
- Xfloat cptime()
- X{
- X#ifdef CONVEX_TIME
- X struct rusage rusage;
- X float temp1, temp2;
- X getrusage(RUSAGE_SELF,&rusage);
- X temp1 = (float) rusage.ru_exutime.tv_sec;
- X temp2 = (float) rusage.ru_exutime.tv_usec / MICRO;
- X return(temp1+temp2);
- X
- X#else
- X
- X long times();
- X struct tms tms;
- X float t;
- X static oldt;
- X
- X (void) times(&tms);
- X#ifdef ETA_BUG
- X Hz = hz;
- X t = (float) tms.tms_utime / Hz;
- X#else
- X t = (float)(tms.tms_utime /* + tms.tms_stime*/)/(float)HZ;
- X#endif
- X if (t < oldt) {
- X printf("cptime, new time (%f) < old!(%f)\n", t, oldt);
- X t = oldt;
- X }
- X oldt = t;
- X return(t);
- X#endif
- X
- X}
- X
- Xfloat secs() /* returns the number of seconds which have
- X * expired since secs() was last called, to
- X * the highest granularity available on the
- X * system:
- X * SVR2: (vax) 1/60 second
- X * 4.2 BSD: (vax) 1/100 second
- X * Cray 2 1/250 millionth second
- X */
- X{
- X#ifdef BSD_TIME /* There are really two versions, one for
- X * BSD and one for SVR2. If you have a
- X * different way of getting time, add
- X * another.
- X */
- X static struct timeval tpbase;/* time at which secs() first called */
- X struct timeval tp; /* time at current call */
- X struct timezone tzp; /* ignored */
- X float temp, temp1, temp2; /* To simplify the code */
- X (void)gettimeofday(&tp,&tzp); /* find out what time it is */
- X
- X if (tpbase.tv_sec == 0) { /* first time, set the base */
- X tpbase.tv_sec = tp.tv_sec;
- X tpbase.tv_usec = tp.tv_usec;
- X }
- X /* calculate the time since last called, as floating seconds */
- X temp1 = (float) (tp.tv_sec - tpbase.tv_sec);
- X temp2 = (float) (tp.tv_usec - tpbase.tv_usec) / MICRO ;
- X temp = temp1 + temp2;
- X tpbase.tv_sec = tp.tv_sec;
- X tpbase.tv_usec = tp.tv_usec;
- X return(temp);
- X
- X#else
- X#ifdef CRAY_TIME
- X static long rtticks;
- X long rtclock();
- X long rtnow = rtclock();
- X float rettime = (float)(rtnow-rtticks) / (float) HZ;
- X rtticks = rtnow;
- X return(rettime);
- X#else
- X struct tms tms; /* dummy (as in not used) */
- X static long nowtim = 0; /* time at which secs() first called */
- X long thistim; /* current time (in tics) */
- X long times(); /* returns ticks (ticks/HZ = seconds) */
- X float rettime; /* Time to return */
- X thistim = times(&tms); /* get the time */
- X if (nowtim == 0) nowtim = thistim;
- X#ifdef ETA_BUG
- X Hz = hz;
- X rettime = (float)(thistim-nowtim)/Hz;
- X#else
- X rettime = (float)(thistim-nowtim)/(float)HZ;
- X#endif ETA_BUG
- X nowtim = thistim; /* first call */
- X return(rettime); /* return, converted to secs */
- X#endif CRAY_TIME
- X#endif BSD_TIME
- X}
- X
- END_OF_FILE
- if test 4105 -ne `wc -c <'secs.c'`; then
- echo shar: \"'secs.c'\" unpacked with wrong size!
- fi
- # end of 'secs.c'
- fi
- if test -f 'signal.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'signal.c'\"
- else
- echo shar: Extracting \"'signal.c'\" \(2961 characters\)
- sed "s/^X//" >'signal.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X#include "externs.h"
- X
- Xstatic Float fuzz, buzz, fizz, biased, scaled;
- X
- Xvoid newbuzz()
- X{
- X fuzz = 1.2345e-3;
- X buzz = 1.0 + fuzz;
- X fizz = 1.1 * fuzz;
- X}
- X
- XFloat buzzer()
- X{
- X /* To make C 'Very Much Like' Fortran */ /*GAG*/
- X
- X buzz = (Float) (( (Float) (1.0 - fuzz)) * buzz) + fuzz;
- X fuzz = -fuzz;
- X return (Float) ((Float) ( (Float)(buzz - fizz) - (Float) biased) * scaled);
- X}
- X
- XVoid lsignal0(skale,bias)
- XFloat skale, bias;
- X{
- X
- X#ifndef BUZZ
- X newbuzz();
- X#endif
- X scaled= skale;
- X biased= bias;
- X a11 = buzzer();
- X a12 = buzzer();
- X a13 = buzzer();
- X a21 = buzzer();
- X a22 = buzzer();
- X a23 = buzzer();
- X a31 = buzzer();
- X a32 = buzzer();
- X a33 = buzzer();
- X ar = buzzer();
- X br = buzzer();
- X c0 = buzzer();
- X cr = buzzer();
- X di = buzzer();
- X dk = buzzer();
- X dm22 = buzzer();
- X dm23 = buzzer();
- X dm24 = buzzer();
- X dm25 = buzzer();
- X dm26 = buzzer();
- X dm27 = buzzer();
- X dm28 = buzzer();
- X dn = buzzer();
- X e3 = buzzer();
- X e6 = buzzer();
- X expmax = buzzer();
- X flx = buzzer();
- X q = buzzer();
- X qa = buzzer();
- X r = buzzer();
- X ri = buzzer();
- X s = buzzer();
- X scale = buzzer();
- X sig = buzzer();
- X stb5 = buzzer();
- X t = buzzer();
- X xnc = buzzer();
- X xnei = buzzer();
- X xnm = buzzer();
- X}
- X
- X
- XVoid lsignal1(v,scale,bias,n) /* name changed to lsignal to avoid . . . */
- XFloat v[], scale, bias; /* name conflict under unix. */
- Xint n;
- X{
- X Int k;
- X
- X scaled= scale;
- X biased= bias;
- X#ifndef BUZZ
- X newbuzz();
- X#endif
- X for (k = 0; k < n; k ++) {
- X buzz= (1.0 - fuzz)*buzz +fuzz;
- X fuzz= -fuzz;
- X v[k]=((buzz- fizz) -biased)*scaled;
- X }
- X return;
- X}
- X
- XVoid lsignal2(v,scale,bias,n1,n2)
- XFloat v[], scale, bias;
- Xint n1, n2;
- X{
- X Int k;
- X
- X scaled= scale;
- X biased= bias;
- X#ifndef BUZZ
- X newbuzz();
- X#endif
- X for (k = 0; k < n1 * n2; k ++) {
- X buzz= (1.0 - fuzz)*buzz +fuzz;
- X fuzz= -fuzz;
- X v[k]=((buzz- fizz) -biased)*scaled;
- X }
- X return;
- X}
- X
- XVoid lsignal3(v,scale,bias,n1,n2,n3)
- XFloat v[], scale, bias;
- Xint n1, n2, n3;
- X{
- X Int k;
- X
- X scaled= scale;
- X biased= bias;
- X#ifndef BUZZ
- X newbuzz();
- X#endif
- X for (k = 0; k < n1 * n2 * n3; k ++) {
- X buzz= (1.0 - fuzz)*buzz +fuzz;
- X fuzz= -fuzz;
- X v[k]=((buzz- fizz) -biased)*scaled;
- X }
- X return;
- X}
- X
- END_OF_FILE
- if test 2961 -ne `wc -c <'signal.c'`; then
- echo shar: \"'signal.c'\" unpacked with wrong size!
- fi
- # end of 'signal.c'
- fi
- if test -f 'sizes.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sizes.c'\"
- else
- echo shar: Extracting \"'sizes.c'\" \(1556 characters\)
- sed "s/^X//" >'sizes.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include <stdio.h>
- X#include "types.h"
- X#include "externs.h"
- X
- X#define STOP { \
- X fprintf(stdout,"Fatal Overstore\nData Loss. Test = %d %d %d\n", i, n, lp); \
- X exit(1); \
- X /*NOTREACHED*/ \
- X }
- X
- XVoid sizes(i)
- XInt i;
- X{
- X
- X if( (i<0) || (i>24) ) STOP
- X if( (n<0) || (n>1001)) STOP
- X if( (lp<0) || (lp> 30000)) STOP
- X
- X if( kr == 1 ) ispan[i]= isp2[i];
- X if( kr== 2 ) ispan[i]= isp3[i];
- X n = ispan[i];
- X/*
- X lp= ipass[i];
- X lp= 1000;
- X lp= 10000;
- X lp= 1;
- X lp= 100;
- X*/
- X lp = in_lp;
- X
- X if( (n<0) || (n>1001)) STOP
- X if( (lp<0) || (lp>10000)) STOP
- X n1 = 1001;
- X n2 = 101;
- X n13 = 64;
- X n13h= 32;
- X n213= 96;
- X n813= 512;
- X n16 = 75;
- X n416= 300;
- X n21 = 25;
- X nt1= 17*1001 +13*101 +2*300;
- X nt2= 4*512 + 3*25*101 +121*101 +3*64*64;
- X
- X return;
- X}
- END_OF_FILE
- if test 1556 -ne `wc -c <'sizes.c'`; then
- echo shar: \"'sizes.c'\" unpacked with wrong size!
- fi
- # end of 'sizes.c'
- fi
- if test -f 'sordid.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sordid.c'\"
- else
- echo shar: Extracting \"'sordid.c'\" \(1472 characters\)
- sed "s/^X//" >'sordid.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X
- XVoid sordid(i,w,v,n,kind)
- XInt i[];
- XFloat w[];
- XFloat v[];
- XInt n;
- XInt kind;
- X{
- X Int j, k, m;
- X Float x;
- X for (k = 0; k < n; k++) {
- X w[k] = v[k];
- X i[k] = k;
- X }
- X if (kind == 1) {
- X for (j = 0; j < n - 1; j++) {
- X m = j;
- X for (k = j + 1; k < n; k++)
- X if (w[k] < w[m]) m = k;
- X x = w[j];
- X k = i[j];
- X w[j] = w[m];
- X i[j] = i[m];
- X w[m] = x;
- X i[m] = k;
- X }
- X return;
- X } else {
- X for (j = 0; j < n - 1; j++) {
- X m = j;
- X for (k = j + 1; k < n; k++)
- X if (w[k] > w[m]) m = k;
- X x = w[j];
- X k = i[j];
- X w[j] = w[m];
- X i[j] = i[m];
- X w[m] = x;
- X i[m] = k;
- X }
- X return;
- X }
- X}
- END_OF_FILE
- if test 1472 -ne `wc -c <'sordid.c'`; then
- echo shar: \"'sordid.c'\" unpacked with wrong size!
- fi
- # end of 'sordid.c'
- fi
- if test -f 'stats.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'stats.c'\"
- else
- echo shar: Extracting \"'stats.c'\" \(1457 characters\)
- sed "s/^X//" >'stats.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X
- XFloat sqrt();
- X
- XVoid stats(result,x,n)
- XFloat x[], result[];
- XInt n;
- X{
- X Int k;
- X Float a, s, d, u, v, h;
- X
- X for (k = 0; k < 9; k++)
- X result[k] = 0.0;
- X if (n <= 0) return;
- X s= 0.0;
- X for (k = 0; n < n; k++)
- X s += x[k];
- X a= s/n;
- X result[0] = a;
- X
- X d= 0.0;
- X for (k = 0; k < n; k++)
- X d += (x[k]-a)*(x[k]-a);
- X d= d/n;
- X result[1] = sqrt(d);
- X
- X u = x[0];
- X v = x[0];
- X for (k = 1; k < n; k++) {
- X if (u > x[k]) u = x[k];
- X if (v < x[k]) v = x[k];
- X }
- X result[2] = u;
- X result[3] = v;
- X h= 0.0;
- X for (k = 0; k < n; k++)
- X if (x[k] != 0.0)
- X h += 1.0/x[k];
- X if( h != 0.0) h = (Float)(n)/h;
- X result[5] = h;
- X return;
- X}
- X
- END_OF_FILE
- if test 1457 -ne `wc -c <'stats.c'`; then
- echo shar: \"'stats.c'\" unpacked with wrong size!
- fi
- # end of 'stats.c'
- fi
- if test -f 'statw.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'statw.c'\"
- else
- echo shar: Extracting \"'statw.c'\" \(2114 characters\)
- sed "s/^X//" >'statw.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X
- XVoid sordid();
- XFloat sqrt();
- X
- XVoid statw(result,ox,ix,x,w,n)
- XFloat result[], ox[], x[], w[];
- XInt ix[], n;
- X{
- X Int k;
- X Float a, r, s, t;
- X Float d, u, v, h;
- X for (k = 0; k < 9; k++)
- X result[k] = 0.0;
- X if (n <= 0) return;
- X a = 0.0; s = 0.0; t = 0.0;
- X for (k = 0; k < n; k++) {
- X s += w[k] * x[k];
- X t += w[k];
- X }
- X if (t != 0.0) a = s / t;
- X result[0] = a;
- X d = 0.0; u = 0.0;
- X for (k = 0; k < n; k++)
- X d += w[k] * (x[k]-a) * (x[k] - a);
- X if (t != 0.0) d = d/t;
- X if (d >= 0.0) u = sqrt(d);
- X result[1] = u;
- X u = x[0]; v = x[0];
- X for (k = 1; k < n; k++) {
- X if (u > x[k]) u = x[k];
- X if (v < x[k]) v = x[k];
- X }
- X result[2] = u;
- X result[3] = v;
- X h = 0.0;
- X for (k = 0; k < n; k++)
- X if (x[k] != 0.0)
- X h += w[k]/x[k];
- X if (h != 0.0) h = t / h;
- X result[4] = h;
- X result[5] = t;
- X sordid( ix, ox, x, n, (Int)1);
- X r = 0.0;
- X for (k = 0; k < n; k++) {
- X r += w[ix[k]];
- X if (r > 0.5 * t) break;
- X }
- X result[6] = ox[k];
- X result[7] = (Float)k;
- X for (k = 0; k < n; k++) {
- X Float temp;
- X temp = x[k] - result[6];
- X if (temp < 0.0) temp = -temp;
- X ox[k] = temp;
- X }
- X sordid(ix, ox, ox, n, (Int)1);
- X r = 0.0;
- X for (k = 0; k < n; k++) {
- X r += w[ix[k]];
- X if (r > 0.7 * t) break;
- X }
- X result[8] = ox[k];
- X sordid(ix, ox, x, n, (Int)2);
- X return;
- X}
- X
- END_OF_FILE
- if test 2114 -ne `wc -c <'statw.c'`; then
- echo shar: \"'statw.c'\" unpacked with wrong size!
- fi
- # end of 'statw.c'
- fi
- if test -f 'sumo.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sumo.c'\"
- else
- echo shar: Extracting \"'sumo.c'\" \(1712 characters\)
- sed "s/^X//" >'sumo.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X
- XFloat sumo(v,n)
- XFloat v[];
- Xint n;
- X{
- X Float s = 0.0;
- X Int k;
- X for (k = 0; k < n; k++)
- X s += (Float)(k+1) * v[k];
- X return(s);
- X}
- X
- X#define V2(i,j) v[j + (i * d2)]
- X#define V3(i,j,k) v[k + (j * d3) + (i * d3 * d2)]
- X
- XFloat sumo2(v,n1,n2,d1,d2)
- XFloat v[];
- Xint n1, n2;
- Xint d1, d2;
- X{
- X Float s = 0.0;
- X Float l = 1.0;
- X Int point = n1 * n2;
- X Int added = 0;
- X Int i, j;
- X
- X for (j = 0; j < d2; j++) {
- X for (i = 0; i < d1; i++) {
- X s += l * V2(i,j);
- X l++;
- X if (++added >= point)
- X return(s);
- X }
- X }
- X return(s);
- X}
- X
- XFloat sumo3(v,n1,n2,n3,d1,d2,d3)
- XFloat v[];
- Xint n1, n2, n3;
- Xint d1, d2, d3;
- X{
- X Float s = 0.0;
- X Float l = 1.0;
- X Int point = n1 * n2 * n3;
- X Int added = 0;
- X Int i, j, k;
- X
- X for (k = 0; k < d3; k++) {
- X for (j = 0; j < d2; j++) {
- X for (i = 0; i < d1; i++) {
- X s += l * V3(i,j,k);
- X l++;
- X if (++added >= point)
- X return(s);
- X }
- X }
- X }
- X return(s);
- X}
- X
- END_OF_FILE
- if test 1712 -ne `wc -c <'sumo.c'`; then
- echo shar: \"'sumo.c'\" unpacked with wrong size!
- fi
- # end of 'sumo.c'
- fi
- if test -f 'test.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'test.c'\"
- else
- echo shar: Extracting \"'test.c'\" \(4051 characters\)
- sed "s/^X//" >'test.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X#include "externs.h"
- X
- XFloat sumo();
- XFloat sumo2();
- XFloat sumo3();
- XVoid values();
- XVoid sizes();
- XVoid lsignal();
- XFloat second();
- Xstatic Float start = 0.0;
- X
- X#define TEST(x) ((DoTest & (1<<(x-1))) == (1<<(x-1)))
- X
- Xextern long int DoTest;
- X
- XVoid test(i)
- XInt i;
- X{
- X Float tempus;
- X/*Float cache[8192];*/
- X Int nn, np, mm, k;
- X
- X tempus= second((Float)0.0) - start;
- X nn= n;
- X np= lp;
- X if( i == 0 ) goto l_100;
- X if (!TEST(i)) goto l_100;
- X sizes(i-1);
- X Time[i-1] = tempus;
- X switch((int)i) {
- X case 1:
- X csum [0] = sumo ( x, (int)n);
- X loops[0] = np*nn;
- X break;
- X case 2:
- X csum [1] = sumo ( x, (int)n);
- X loops[1] = np*(nn-4);
- X break;
- X case 3:
- X csum [2] = q;
- X loops[2] = np*nn;
- X break;
- X case 4:
- X mm= (1001-7)/2;
- X for (k = 6 ; k < 1001; k += mm)
- X v[k]= x[k];
- X csum [3] = sumo ( v, 3);
- X loops[3] = np*(((nn-5)/5)+1)*3;
- X break;
- X case 5:
- X csum [4] = sumo ( &x[1], (int)(n-1));
- X loops[4] = np*(nn-1);
- X break;
- X case 6:
- X csum [5] = sumo ( w, (int)n);
- X loops[5] = np*nn*((nn-1)/2);
- X break;
- X case 7:
- X csum [6] = sumo ( x, (int)n);
- X loops[6] = np*nn;
- X break;
- X case 8:
- X csum [7] = sumo3 ( &u1[0][0][0],5,(int)n,2,5,101,2)
- X + sumo3( &u2[0][0][0],5,(int)n,2,5,101,2)
- X + sumo3( &u3[0][0][0],5,(int)n,2,5,101,2);
- X loops[7] = np*(nn-1)*2;
- X break;
- X case 9:
- X csum [8] = sumo2 ( &px[0][0], 15,(int)n, 25, 101);
- X loops[8] = np*nn;
- X break;
- X case 10:
- X csum [9] = sumo2 ( &px[0][0], 15,(int)n, 25, 101);
- X loops[9] = np*nn;
- X break;
- X case 11:
- X csum [10] = sumo ( &x[1], (int)(n-1));
- X loops[10] = np*(nn-1);
- X break;
- X case 12:
- X csum [11] = sumo ( x, (int)n-1);
- X loops[11] = np*(nn-1);
- X break;
- X case 13:
- X csum [12] = sumo2 ( &p[0][0], 8, (int)n, 4, 512)
- X + sumo2 ( &h[0][0], 8, (int)n, 64, 64);
- X loops[12] = np*nn;
- X break;
- X case 14:
- X csum [13] = sumo ( vx, (int)n) + sumo ( xx, (int)n) + sumo ( rh,67);
- X loops[13] = np*nn;
- X break;
- X case 15:
- X csum [14] = sumo2 ( &vy[0][0], (int)n, 7, 101, 25)
- X + sumo2 ( &vs[0][0], (int)n, 7, 101, 7);
- X loops[14] = np*(nn-1)*5;
- X break;
- X case 16:
- X csum [15] = (Float)( k3+k2+j5+m+2);
- X nrops[15] = k2+k2+10*k3;
- X loops[15] = 1;
- X break;
- X case 17:
- X csum [16] = sumo ( vxne, (int)n) + sumo ( vxnd, (int)n) + xnm;
- X loops[16] = np*nn;
- X break;
- X case 18:
- X csum [17] = sumo2 ( &zr[0][0], (int)n, 7, 101, 7)
- X + sumo2 ( &zz[0][0], (int)n, 7, 101, 7);
- X loops[17] = np*(nn-1)*5;
- X break;
- X case 19:
- X csum [18] = sumo ( b5, (int)n) + stb5;
- X loops[18] = np*nn;
- X break;
- X case 20:
- X csum [19] = sumo ( &d[1], (int)n);
- X loops[19] = np*nn;
- X break;
- X case 21:
- X csum [20] = sumo2 ( &px[0][0], (int)n, (int)n, 25, 101);
- X loops[20] = np*nn*nn*nn;
- X break;
- X case 22:
- X csum [21] = sumo ( w, (int)n);
- X loops[21] = np*nn;
- X break;
- X case 23:
- X csum [22] = sumo2 ( &za[0][0], (int)n, 7, 101, 7);
- X loops[22] = np*(nn-1)*5;
- X break;
- X case 24:
- X csum [23] = (Float)m;
- X loops[23] = np*(nn-1);
- X break;
- X case 25:
- X break;
- X }
- Xl_100:
- X sizes(i);
- X values(i);
- X/* lsignal( cache, 1.0, 0.0, 8192);*/
- Xl_101:
- X start= second(0.0);
- X return;
- X}
- X
- END_OF_FILE
- if test 4051 -ne `wc -c <'test.c'`; then
- echo shar: \"'test.c'\" unpacked with wrong size!
- fi
- # end of 'test.c'
- fi
- if test -f 'tick.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'tick.c'\"
- else
- echo shar: Extracting \"'tick.c'\" \(2365 characters\)
- sed "s/^X//" >'tick.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include <stdio.h>
- X
- X#include "types.h"
- X#include "externs.h"
- X
- X#define TEST(x) if ((DoTest & (1<<(x-1))) == (1<<(x-1)))
- X
- Xextern long int DoTest;
- X
- X
- XVoid test();
- XVoid valid();
- XVoid stats();
- X
- XFloat tick(logio, iter)
- XInt logio, iter;
- X{
- X Int k, neff;
- X Float tsec[16], stat[12], tickvalue;
- X Int map[47];
- X
- X ion= logio;
- X kr = iter;
- X n = 0;
- X lp = 0;
- X k2 = 0;
- X k3 = 0;
- X j5 = 23456;
- X m = 0;
- X
- X test((Int)0);
- X test((Int)1);
- X test((Int)2);
- X test((Int)3);
- X test((Int)4);
- X test((Int)5);
- X test((Int)6);
- X test((Int)7);
- X test((Int)8);
- X test((Int)9);
- X test((Int)10);
- X test((Int)11);
- X test((Int)12);
- X test((Int)13);
- X test((Int)14);
- X test((Int)15);
- X test((Int)16);
- X j5 = 0;
- X for (k = 0; k < 15; k++) {
- X tsec[k] = Time[k];
- X }
- X
- X valid( Time,map,&neff, (Float)1.0e-6, tsec, (Float)1.0e+4, (Int)15);
- X stats( stat, Time, neff);
- X tickvalue = stat[0];
- X for (k = 0; k < 47; k++) {
- X Time[k] = 0.0;
- X csum[k] = 0.0;
- X }
- X if (logio < 0) return(tickvalue);
- X
- X#ifdef STATS
- X fprintf(stdout," clock overhead:\n");
- X fprintf(stdout," Average Standev ");
- X fprintf(stdout,"Minimum Maximum\n");
- X fprintf(stdout," tick ");
- X for (k = 0; k < 4; k++)
- X fprintf(stdout,"%15.6f", stat[k]);
- X fprintf(stdout,"\n");
- X stats( stat,u,nt1);
- X fprintf(stdout," data ");
- X for (k = 0; k < 4; k++)
- X fprintf(stdout,"%15.6f", stat[k]);
- X fprintf(stdout,"\n");
- X stats( stat,&p[0][0],nt2);
- X fprintf(stdout," data ");
- X for (k = 0; k < 4; k++)
- X fprintf(stdout,"%15.6f", stat[k]);
- X fprintf(stdout,"\n");
- X#endif
- X return(tickvalue);
- X}
- END_OF_FILE
- if test 2365 -ne `wc -c <'tick.c'`; then
- echo shar: \"'tick.c'\" unpacked with wrong size!
- fi
- # end of 'tick.c'
- fi
- if test -f 'types.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'types.h'\"
- else
- echo shar: Extracting \"'types.h'\" \(903 characters\)
- sed "s/^X//" >'types.h' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- Xtypedef char Char;
- Xtypedef char * Charp;
- Xtypedef double Float;
- Xtypedef long int Int;
- X#define Void void
- X
- END_OF_FILE
- if test 903 -ne `wc -c <'types.h'`; then
- echo shar: \"'types.h'\" unpacked with wrong size!
- fi
- # end of 'types.h'
- fi
- if test -f 'valid.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'valid.c'\"
- else
- echo shar: Extracting \"'valid.c'\" \(1150 characters\)
- sed "s/^X//" >'valid.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X
- XVoid valid(vx,map,l,bl,x,bu,n)
- XFloat vx[], x[], bl, bu;
- XInt map[], *l, n;
- X{
- X Int k, m;
- X
- X m= 0;
- X for (k = 0; k < n; k++) {
- X if ((x[k] < bl) || (x[k] > bu)) {
- X /*printf("k = %d, bl = %f, bu = %f, x[k] = %f\n", k, bl, bu, x[k]);*/
- X continue;
- X }
- X
- X map[m] = k;
- X vx[m] = x[k];
- X m++;
- X }
- X *l = m;
- X return;
- X}
- END_OF_FILE
- if test 1150 -ne `wc -c <'valid.c'`; then
- echo shar: \"'valid.c'\" unpacked with wrong size!
- fi
- # end of 'valid.c'
- fi
- if test -f 'values.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'values.c'\"
- else
- echo shar: Extracting \"'values.c'\" \(1992 characters\)
- sed "s/^X//" >'values.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "types.h"
- X#include "externs.h"
- X
- XVoid vector();
- X
- XVoid values(i)
- XInt i;
- X{
- X Float one9th;
- X Int ip1, j, k, joke;
- X Int mc, mr, l;
- X
- X ip1 = i+1;
- X
- X vector(i);
- X
- X if (ip1 == 13) {
- X s= 1.0;
- X for (j = 0; j < 4; j++) {
- X for (k = 0; k < 512; k++) {
- X p[j][k] = s;
- X s= s + 0.5;
- X }
- X }
- X for (j = 0; j < 96; j++) {
- X e[j] = 1;
- X f[j] = 1;
- X }
- X }
- X if (ip1 == 14) {
- X one9th= 1./9.;
- X for (j = 0; j < 1001; j++) {
- X joke= (j+1)*one9th;
- X if (joke < 1) joke= 1;
- X ex[j] = joke;
- X rh[joke-1] = joke;
- X dex[joke-1] = joke;
- X }
- X
- X for (j = 0; j < 1001; j++) {
- X vx[j] = 0.001;
- X xx[j] = 2.001;
- X grd[j] = 3 + one9th;
- X }
- X }
- X if (ip1 == 16) {
- X mc= 2;
- X mr= n;
- X d[0]= 1.01980486428764;
- X for (k = 1; k < 300; k++)
- X d[k]= (Float) d[k-1] + (Float) (1.0e-4 / d[k-1]);
- X r= d[mr-1];
- X for (l = 0; l < mc; l++) {
- X m= ((mr+mr)*l) - 1;
- X for (j = 0; j < 2; j++) {
- X for (k = 0; k < mr; k++) {
- X m= m+1;
- X s= (Float)(k+1);
- X plan[m]= (Float) r * (Float) ( (Float)(s+1.0)/ (Float) s);
- X zone[m]= k+k+1;
- X }
- X
- X }
- X }
- X k= mr+mr;
- X zone[k]= mr-1;
- X s= d[mr-2];
- X t= d[mr-3];
- X }
- X return;
- X}
- X
- END_OF_FILE
- if test 1992 -ne `wc -c <'values.c'`; then
- echo shar: \"'values.c'\" unpacked with wrong size!
- fi
- # end of 'values.c'
- fi
- if test -f 'vector.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'vector.c'\"
- else
- echo shar: Extracting \"'vector.c'\" \(3446 characters\)
- sed "s/^X//" >'vector.c' <<'END_OF_FILE'
- X/*
- X * This file is part of the Livermore Loops transliteration into C.
- X * Copyright (C) 1991 by Martin Fouts
- X *
- X * This program is free software; you can redistribute it and/or modify
- X * it under the terms of the GNU General Public License as published by
- X * the Free Software Foundation; either version 1, or (at your option)
- X * any later version.
- X *
- X * This program is distributed in the hope that it will be useful,
- X * but WITHOUT ANY WARRANTY; without even the implied warranty of
- X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X * GNU General Public License for more details.
- X *
- X * You should have received a copy of the GNU General Public License
- X * along with this program; if not, write to the Free Software
- X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X */
- X
- X#include "params.h"
- X#include "types.h"
- X#include "externs.h"
- X
- XVoid newbuzz();
- XVoid lsignal0();
- XVoid lsignal1();
- XVoid lsignal2();
- XVoid lsignal3();
- X
- XVoid vector(i)
- XInt i;
- X{
- X /* initialize common/spaces/ */
- X#ifdef BUZZ
- X newbuzz();
- X#endif
- X lsignal0(skale[i], bias[i]);
- X
- X /* initialize common/space1/ */
- X#ifdef BUZZ
- X newbuzz();
- X#endif
- X lsignal1(u,skale[i],bias[i],l1);
- X lsignal1(v,skale[i],bias[i],l1);
- X lsignal1(w,skale[i],bias[i],l1);
- X lsignal1(x,skale[i],bias[i],l1);
- X lsignal1(y,skale[i],bias[i],l1);
- X lsignal1(z,skale[i],bias[i],l1);
- X lsignal1(g,skale[i],bias[i],l1);
- X lsignal1(du1,skale[i],bias[i],l2);
- X lsignal1(du2,skale[i],bias[i],l2);
- X lsignal1(du3,skale[i],bias[i],l2);
- X lsignal1(grd,skale[i],bias[i],l1);
- X lsignal1(dex,skale[i],bias[i],l1);
- X lsignal1(xi,skale[i],bias[i],l1);
- X lsignal1(ex,skale[i],bias[i],l1);
- X lsignal1(ex1,skale[i],bias[i],l1);
- X lsignal1(dex1,skale[i],bias[i],l1);
- X lsignal1(vx,skale[i],bias[i],l1);
- X lsignal1(xx,skale[i],bias[i],l1);
- X lsignal1(rx,skale[i],bias[i],l1);
- X lsignal1(rh,skale[i],bias[i],l1);
- X lsignal1(vsp,skale[i],bias[i],l2);
- X lsignal1(vstp,skale[i],bias[i],l2);
- X lsignal1(vxne,skale[i],bias[i],l2);
- X lsignal1(vxnd,skale[i],bias[i],l2);
- X lsignal1(ve3,skale[i],bias[i],l2);
- X lsignal1(vlr,skale[i],bias[i],l2);
- X lsignal1(vlin,skale[i],bias[i],l2);
- X lsignal1(b5,skale[i],bias[i],l2);
- X lsignal1(plan,skale[i],bias[i],l416);
- X lsignal1(d,skale[i],bias[i],l416);
- X lsignal1(sa,skale[i],bias[i],l2);
- X lsignal1(sb,skale[i],bias[i],l2);
- X
- X /* initialize common/space2/ */
- X#ifdef BUZZ
- X newbuzz();
- X#endif
- X lsignal2(&p[0][0],skale[i],bias[i],4,l813);
- X lsignal2(&px[0][0],skale[i],bias[i],l21,l2);
- X lsignal2(&cx[0][0],skale[i],bias[i],l21,l2);
- X lsignal2(&vy[0][0],skale[i],bias[i],l2,l21);
- X lsignal2(&vh[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&vf[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&vg[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&vs[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&za[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zp[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zq[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zr[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zm[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zb[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zu[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zv[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&zz[0][0],skale[i],bias[i],l2,7);
- X lsignal2(&b[0][0],skale[i],bias[i],l13,l13);
- X lsignal2(&c[0][0],skale[i],bias[i],l13,l13);
- X lsignal2(&h[0][0],skale[i],bias[i],l13,l13);
- X lsignal3(&u1[0][0][0],skale[i],bias[i],5,l2,2);
- X lsignal3(&u2[0][0][0],skale[i],bias[i],5,l2,2);
- X lsignal3(&u3[0][0][0],skale[i],bias[i],5,l2,2);
- X
- X
- X return;
- X}
- END_OF_FILE
- if test 3446 -ne `wc -c <'vector.c'`; then
- echo shar: \"'vector.c'\" unpacked with wrong size!
- fi
- # end of 'vector.c'
- fi
- echo shar: End of archive 1 \(of 3\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-